// ml:run = $bin < input
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>

int n;

std::string ans[2000];

int main()
{
    std::ios_base::sync_with_stdio(false);
    std::cin >> n;
    for (int i = 0; i < n; i++) std::cin >> ans[i];
    bool ok = false;
    for (int i = 0; i < n; i++) {
        std::string s = ans[i];
        if (s[0] == s[1] && s[0] == 'O') {
            s[0] = s[1] = '+';
            ans[i] = s;
            ok = true;
            break;
        }
        if (s[3] == s[4] && s[3] == 'O') {
            s[3] = s[4] = '+';
            ans[i] = s;
            ok = true;
            break;
        }
    }
    if (ok) {
        std::cout << "YES\n";
        for (int i = 0; i < n; i++)
            std::cout << ans[i] << "\n";
    } else std::cout << "NO\n";
}

